package com.company.lianbiao;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 测试链表
 */
public class TestLinkedList01 {
    public static void main(String args[]) throws IOException
    {
        BufferedReader buf;
        buf=new BufferedReader(new InputStreamReader(System.in));
        String name;

        LinkedList01 list=new LinkedList01();
        for (int i=1;i<4;i++)
        {
            System.out.print("请输入姓名： ");
            name=buf.readLine();
            list.continuensert(name);
            System.out.println("-------------");
        }
        list.print();


        System.out.print("请输入要删除姓名： ");
        name = buf.readLine();
        list.delete(name);
        System.out.println("-------------");
        list.print();
    }
}
